package com.musifind.common;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class DateTimeUtils {
	public static String stringToDate(String strDate) throws ParseException {
		SimpleDateFormat curFormater = new SimpleDateFormat("yyyy-MM-dd", Locale.US);
		Date dateObj = curFormater.parse(strDate);
		SimpleDateFormat postFormater = new SimpleDateFormat("yyyy", Locale.US);

		String newDateStr = postFormater.format(dateObj);
		return newDateStr;
	}
}
